/*
 * ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
 * Without permission, no one has the right to obtain, disclose or use this software in any way.
 */

package com.ecarx.systemui.plugin.psd;

import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.WindowInsets;
import android.view.WindowInsetsController;
import android.widget.LinearLayout;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.WindowInsetsCompat;

import com.ecarx.systemui.plugin.NavigationBar;
import com.ecarx.systemui.plugin.R;
import com.ecarx.systemui.plugin.StatusBar;
import com.ecarx.systemui.plugin.utils.DensityUtils;
import com.ecarx.systemui.plugin.utils.LogUtils;


public class PSDMainActivity extends AppCompatActivity {

    private static final String TAG = "PSDMainActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_psd_main);

    }

    @Override
    protected void onStart() {
        super.onStart();
        LogUtils.d(TAG, "onStart");


    }

    @Override
    protected void onResume() {
        super.onResume();
        LogUtils.d(TAG, "onResume");

        getWindow().getDecorView().post(new Runnable() {
            @Override
            public void run() {
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
                    getWindow().getDecorView().getWindowInsetsController().hide(WindowInsets.Type.navigationBars());

                    boolean visible = getWindow().getDecorView().getRootWindowInsets().isVisible(WindowInsets.Type.navigationBars());
                    LogUtils.d(TAG, " psd visible:" + visible);

                }
            }
        });

    }

}